package com.pxst.sys.entity;

import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pxst.entity.BaseEntity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/** 
* @author yangxy
* @version 创建时间：2023年7月27日 下午3:59:36 
*/
@Data
@TableName("sys_admin_authority")
public class AuthorityEntity extends BaseEntity {
	@TableId(type = IdType.ASSIGN_ID)
	private Long id;
	
	@ApiModelProperty(value = "权限名称")
	@NotNull
	private String authorityName;

	@ApiModelProperty(value = "权限编码")
	@NotNull
	private String authorityCode;

	@ApiModelProperty(value = "权限类型（1菜单，2按钮，3功能）")
	@NotNull
	private Integer authorityType;

	@ApiModelProperty(value = "描述")
	@NotNull
	private String remark;

	@ApiModelProperty(value = "是否启用(0是，1否)")
	@NotNull
	private Integer isUse;
	
	@ApiModelProperty(value = "上级ID")
	private Long pid;
	
	@TableField(exist = false)
	@ApiModelProperty(value = "子集权限")
	private List<AuthorityEntity> children;

}
